class Solution {
public:
    double Power(double base, int exponent) {
        double bw=1;
        double res=0;
        for(int i=0;i<abs(exponent);i++)
            bw=bw*base;
        res=bw;
        if(exponent<0)
        {
            res=1/res;
        }
        return res;
    }
};